package io.seata.samples.tcc.action;

import org.apache.seata.rm.tcc.api.*;

/**
 * The interface Tcc action two.
 *
 * @author Administrator
 */
@LocalTCC
public interface TccActionTwo {
    /**
     * Prepare Method
     *
     * @param param the param
     * @return the boolean
     */
    @TwoPhaseBusinessAction(name = "TccActionTwo", commitMethod = "commit", rollbackMethod = "rollback")
    boolean prepare(@BusinessActionContextParameter(paramName = "param") String param);

    /**
     * Commit Method
     *
     * @param actionContext the action context
     * @return the boolean
     */
    boolean commit(BusinessActionContext actionContext);

    /**
     * Rollback Method
     *
     * @param actionContext the action context
     * @return the boolean
     */
    boolean rollback(BusinessActionContext actionContext);
}
